% Skript to play around with n and w for the Strategy LeeLee. 
% Skript calculates the optimal values for xij, to minimize the maximum of
% function 'LeeLee', which includes all the probabilities where the ship
% will be after threee steps. 
% It also give the resulting value.

%n and w are set, they are global, because then the same values are used in
%function LeeLee
global n;
n=10;
global w;
w=50;

% Starting Point
x0=ones(n,w).*0.6;

%Find Minimum of the Maximum
[x,fval]=fminimax(@LeeLee, x0)

disp('The value the ship can reach is: ')
max(max(max(fval)))